package Scene5;

import Picture.GameImage;
import Scene1.Scene1;

import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;


public class SpeakPanel extends JPanel {

    Scene1 scene1 = new Scene1();
    Scene5 scene5 = new Scene5();
    BufferedImage imgP = scene5.stackPic.pop();

    BufferedImage imgF = scene5.stackFont.pop();
    public void reSize(JFrame frame){
        frame.setSize(1550,1180);

    }
    public void paint(Graphics g){
        g.drawImage(imgP,0,0,null);
        g.drawImage(GameImage.get("/Picture/npc4.png"),-80,450,null);
        g.drawImage(scene1.map.get("聊天框"),250,800,null);
        g.drawImage(scene1.map.get("箭头"),1200,970,null);
        g.drawImage(imgF,360,840,null);

    }

    public void changeFont() {
        if(!scene5.stackFont.isEmpty())
        imgF = scene5.stackFont.pop();
        repaint();
    }

    public void changePic() {
        imgP = scene5.stackPic.pop();

    }
}
